<?php
    function is_mobile(){
        if(preg_match('/(iphone|ipad|ipod|android)/i', strtolower($_SERVER['HTTP_USER_AGENT']))){
            return true;
        }else{
            return false;
        }
    }
    $isMobile = is_mobile();
?>
    <!DOCTYPE html>
    <html lang="zh-CN">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta charset="utf-8">
        <title>唯一官方认定中科大家教平台</title>
        <meta name="keywords" content="家教,中科大,科大,家教中介,平台,超老师,名校家教 ">
        <meta name="description" content="超老师家教平台是中国科学技术大学辅导中心唯一官方指定平台，专为中小学家长朋友们提供优质的科大家教服务。
我们对平台的每一位老师负责，为老师教授的每一位学生负责，为老师讲授的每一节课负责。我们全程跟进教学、深度参与教学与质量检测。严把质量关，力求教学效果最大化，让孩子在最短的时间，有最大的进步！​‌‌">
        <meta name="author" content="Hou">
        <meta name="viewport" content="width=device-width,height=device-height,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
        <link rel="stylesheet" href="/Public/index/bootstrap.min.css">
        <link rel="stylesheet" type="text/css" href="/Public/index/style.css">
        <link rel="stylesheet" href="/Public/index/index.css">
        <link rel="stylesheet" type="text/css" href="/Public/index/iconfont/iconfont.css">
        <style type="text/css">
            .control-label {
                width: 15%;
                height: 32px;
                line-height: 32px;
            }
            .form-control {
                width: 80%;
                resize: none;
            }
            .clearfix:after {
                content: '';
                display: block;
                clear: both;
                overflow: hidden;
            }
            #grade {
                float: left;
                margin-right:20px;
            }
        </style>
    </head>
    <body id="page-top" class="index">

    <nav class="navbar navbar-default  navbar-fixed-top">
        <nav class="navbar navbar-default">
            <div class="container">
                <div class="navbar-header page-scroll">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#beatsbeans-navbar">
                        <!--   <span class="sr-only">Toggle navigation</span>
                          <span class="icon-bar"></span>
                          <span class="icon-bar"></span>
                          <span class="icon-bar"></span> -->
                    </button>
                    <a class="navbar-brand page-scroll" style="text-align: center;" href="/">
                        <strong>超老师<br>SUPER TEACHER
                            <span class="en"></span></strong>
                    </a>
                </div>
                <div class="collapse navbar-collapse" id="beatsbeans-navbar">
                    <ul class="nav navbar-nav navbar-right">
                        <?php
                        if($_SESSION['phone']){
                    ?>
                        <li class="disappear_when_log">
                            <?php if($_SESSION['type'] == 2){?>
                            <a>
                                <?php echo $_SESSION['phone']?>
                            </a>
                        </li>
                        <li class="disappear_when_log">
                            <a href="/Home/Order/studentorder">
                                我的课程
                            </a>
                        </li>
                        <?php } ?>
                        <?php if($_SESSION['type'] == 1){?>
                        <li>
                            <a href="/Home/Teacher/center">
                                <?php echo $_SESSION['phone']?>
                            </a>
                        </li>
                        <?php } ?>
                        <li class="disappear_when_log"><a href="/Home/Index/logoout">退出</a></li>

                        <?php
                        }else{
                    ?>
                        <li class="disappear_when_log"><a href="/Home/Index/register">注册</a></li>
                        <li class="disappear_when_log"><a href="/Home/Index/login">登录</a></li>
                        <?php
                        }
                    ?>

                        <li><a href="/Home/Index/teacherList">浏览教员</a></li>
                        <li><a href="/Home/Requirement/index/status/0">家教需求列表</a></li>
                    </ul>
                </div>
                <!-- /.navbar-collapse -->
            </div>
            <!-- /.contaienr -->
        </nav>
    </nav>

    <div class="cover">
        <if condition="$isMobile eq 1 ">
            <div class="cover-image cover-bg">

            </div>
            <else/>
            <div class="cover-image">
                <img src="/Public/index/resource/39-131121154633a1.jpg" alt="">
            </div>
        </if>
        <div class="content">
            <div class="index-title text-center">
                <div class="modal fade" id="FastFindModal" tabindex="-1" role="dialog" aria-labelledby="FastFindModalLabel" aria-hidden="true" style="color:#333;">
                    <div class="modal-dialog text-center">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                    <span aria-hidden="true">×</span>
                                </button>
                                <h4 class="modal-title" id="FastFindModalLabel">请填写相关信息</h4>
                            </div>

                            <div class="modal-body">
                                <div class="login-form" ng-controller="FastOrderCtrl">
                                    <form>
                                        <div class="row">
                                            <div class="col-md-3 col-xs-12">
                                            </div>
                                            <div class="col-md-12 col-xs-12">
                                                <div class="form-group clearfix">
                                                    <label class="control-label left" for="phone">
                                                        姓名
                                                    </label>
                                                    <input type="name" class="form-control login-field long_name" value="" placeholder="请输入姓名" id="phone" name="name" required="">
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group clearfix">
                                            <label class="control-label left" for="cellphone">手机</label>
                                            <input class="form-control login-field long_cellphone" type="text" placeholder="请输入手机号码" id="cellphone" name="cellphone" required="">
                                        </div>
                                        <div class="form-group clearfix" >
                                            <label class="control-label left" for="subject" style=" line-height:47px;">年级</label>
                                            <select name="grade" id="grade">
                                                <option value="" selected>请选择年级</option>
                                                <option value="1">一年级</option>
                                                <option value="2">二年级</option>
                                                <option value="3">三年级</option>
                                                <option value="4">四年级</option>
                                                <option value="5">五年级</option>
                                                <option value="6">六年级</option>
                                                <option value="7">七年级</option>
                                                <option value="8">八年级</option>
                                                <option value="9">九年级</option>
                                                <option value="10">高一</option>
                                                <option value="11">高二</option>
                                                <option value="12">高三</option>
                                            </select>
                                        </div>
                                        <div class="form-group clearfix">
                                            <label class="control-label left" for="lesson">科目</label>
                                            <input class="form-control login-field" type="text" placeholder="请输入科目" id="lesson" name="lesson" required="">
                                        </div>
                                        <div class="form-group clearfix">
                                            <label class="control-label left" for="time">时间</label>
                                            <input class="form-control login-field long_time" type="text" placeholder="请输入您预约时间，例：2016-01-01" id="time" name="time" required="">
                                        </div>

                                        <div class="form-group clearfix">
                                            <label class="control-label left" for="location">地址</label>
                                            <input class="form-control login-field  long_address"  type="text" placeholder="请输入您的家庭地址" id="location" name="address" required="">
                                        </div>

                                        <div class="form-group clearfix">
                                            <label class="control-label left" for="desc">备注</label>
                                            <textarea class="form-control login-field  long_remarks" type="text" placeholder="您可以留言备注信息哦" id="desc" name="remarks" rows="3"></textarea>
                                        </div>

                                        <a href="javascript:;" class="btn bg-green white btn-lg btn-block kkk_click  " data-dismiss="modal" type="submit">提交预约</a>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div> <!-- modal ENDS -->
                <h1 class="index-heading">益友良师</h1>

                <p class="index-subheading"><strong>唯一官方认定中科大家教平台</strong></p>
                <a href="/Home/Index/teacherList" class="btn btn-primary index-btn find-tutor"
                   id="findTutor">寻找老师</a>
                <br>
                <a href="javascript:;"  class="btn btn-primary index-btn find-tutor long_click"
                   id="" data-id="<?php echo
$vo['user_id'] ?>">家长发布需求</a>
                <br>
                <a href="#process" class="btn guide-btn index-btn how-to-use"
                   id="guideBtn">如何使用</a>
                <br>
                <a href="/Home/Index/register"
                   class="btn btn-info index-btn apply-teacher" id="applyTeacher" style="display:none;">成为教员</a>

            </div>
        </div>

    </div>

    <if condition="$isMobile eq 1 ">
        <div class="m-subject-index">
            <nav>
                <a href="/Home/Index/teacherList/grade/0/sex/0/school/0/lesson/4" lesson="物理"></a>
                <a href="/Home/Index/teacherList/grade/0/sex/0/school/0/lesson/2" lesson="数学"></a>
                <a href="/Home/Index/teacherList/grade/0/sex/0/school/0/lesson/1" lesson="语文"></a>
                <a href="/Home/Index/teacherList/grade/0/sex/0/school/0/lesson/5" lesson="化学"></a>
            </nav>
            <nav>
                <a href="/Home/Index/teacherList/grade/0/sex/0/school/0/lesson/6" lesson="生物"></a>
                <a href="/Home/Index/teacherList/grade/0/sex/0/school/0/lesson/3" lesson="英语"></a>
                <a href="/Home/Index/teacherList/lesson/0/sex/0/school/0/grade/0" lesson="自主招生"></a>
                <a href="/Home/Index/teacherList/lesson/0/sex/0/school/0/grade/0" lesson="竞赛"></a>
            </nav>
        </div>
        <else/>
        <div class="subject-index">
            <div class="container">
                <div class="row text-center">
                    <div class="">
                        <div class="subject-list first">
                            <ul class="list-unstyled">
                                <li>
                                    <div class="subject-item circle">
                                        <a href="/Home/Index/teacherList/grade/0/sex/0/school/0/lesson/4">
                                            <div class="content">
                                                物理
                                            </div>
                                        </a>
                                    </div>
                                </li>
                                <li>
                                    <div class="subject-item circle">
                                        <a href="/Home/Index/teacherList/grade/0/sex/0/school/0/lesson/2">
                                            <div class="content">
                                                数学
                                            </div>
                                        </a>
                                    </div>
                                </li><li>
                                <div class="subject-item circle">
                                    <a href="/Home/Index/teacherList/grade/0/sex/0/school/0/lesson/1">
                                        <div class="content">
                                            语文
                                        </div>
                                    </a>
                                </div>
                            </li><li>
                                <div class="subject-item circle">
                                    <a href="/Home/Index/teacherList/grade/0/sex/0/school/0/lesson/5">
                                        <div class="content">
                                            化学
                                        </div>
                                    </a>
                                </div>
                            </li>
                                <li>
                                    <div class="subject-item circle">
                                        <a href="/Home/Index/teacherList/grade/0/sex/0/school/0/lesson/6">
                                            <div class="content">
                                                生物
                                            </div>
                                        </a>
                                    </div>
                                </li>
                                <li>
                                    <div class="subject-item circle">
                                        <a href="/Home/Index/teacherList/grade/0/sex/0/school/0/lesson/3">
                                            <div class="content">
                                                英语
                                            </div>
                                        </a>
                                    </div>
                                </li>
                                <li>
                                    <div class="subject-item circle">
                                        <a href="/Home/Index/teacherList/lesson/0/sex/0/school/0/grade/0">
                                            <div class="content">
                                                自主招生
                                            </div>
                                        </a>
                                    </div>
                                </li>
                                <li>
                                    <div class="subject-item circle">
                                        <a href="/Home/Index/teacherList/lesson/0/sex/0/school/0/grade/0">
                                            <div class="content">
                                                竞赛
                                            </div>
                                        </a>
                                    </div>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </if>




    <div class="portrait">
        <div class="container">
            <div class="row">
                <div class="col-lg-6 col-lg-offset-3 text-center heading-wrapper">
                    <h3 class="heading">寻找优秀老师</h3>
                    <h4 class="subheading text-muted">曾经,他们是得各省名师真传的超级学生!</h4>
                    <h4 class="subheading text-muted"> 今天,他们是倾力传授绝技的超级老师!</h4>
                </div>
            </div>
            <div class="row portrait-wrapper">
                <div class="col-md-4 col-sm-6 portrait-item">
                    <a href="/Home/Index/teacherDetail/id/16">
                        <img src="/Public/index/teacher-1.png" class="teachimg img-responsive" alt="" title="">

                        <div class="teacherinfo"
                             style="background-color: #f0f0ef;">
                            <p class="teacheng">
                                <span>刘轩</span>中国科技大学  物理学院
                            </p>

                            <h2><span>高中</span>数学/物理/物理竞赛</h2>

                            <p>
                                物理竞赛全省前十 保送科大 <br>
                                国家奖学金得主 教学经验丰富
                            </p>
                            <p class="show-txt">合肥能把物理教明白的高中物理老师不多，我算其中一个</p>
                        </div>

                    </a>
                </div>
                <!-- ./item-1 -->
                <div class="col-md-4 col-sm-6 portrait-item">
                    <a href="/Home/Index/teacherDetail/id/17">
                        <img src="/Public/index/teacher-2.png" class="teachimg img-responsive" alt="" title="">

                        <div class="teacherinfo"
                             style="background-color: #f0f0ef;">

                            <p class="teacheng">
                                <span>张桐</span>中国科技大学  数学科学学院
                            </p>

                            <h2><span>高中</span>数学</h2>

                            <p>数学竞赛省一  降分保送科大 <br>
                                华罗庚英才班  具有一定辅导经验</p>
                            <p class="show-txt">为你豁然开朗而来！</p>
                        </div>
                    </a>
                </div>
                <!-- ./item-2 -->
                <div class="col-md-4 col-sm-6 portrait-item">
                    <a href="/Home/Index/teacherDetail/id/24">
                        <img src="/Public/index/teacher-3.png" class="teachimg img-responsive" alt="" title="">

                        <div class="teacherinfo"
                             style="background-color: #f0f0ef;">
                            <p class="teacheng">
                                <span>陈岚</span>中国科技大学  材料科学与工程
                            </p>

                            <h2><span>高中</span> 化学 /生物</h2>

                            <p>高考成绩630 辅导经验丰富</p>
                            <p class="show-txt">为学生，从来竭尽全力！</p>
                        </div>
                    </a>
                </div>
                <!-- ./item-3 -->

                <div class="col-md-4 col-sm-6 portrait-item">
                    <a href="/Home/Index/teacherDetail/id/19">
                        <img src="/Public/index/teacher-4.png" class="teachimg img-responsive" alt="" title="">

                        <div class="teacherinfo"
                             style="background-color: #f0f0ef;">

                            <p class="teacheng">
                                <span>沈峰</span>中国科技大学  工程科学学院
                            </p>

                            <h2><span>高中</span>数学 /物理</h2>

                            <p>科大自主招生    高考655分 一年专职辅导经验</p>
                            <p class="show-txt">老师我教法这么多，总有一款适合你。</p>
                        </div>
                    </a>
                </div>
                <!-- ./item-4 -->
                <div class="col-md-4 col-sm-6 portrait-item">
                    <a href="/Home/Index/teacherDetail/id/25">
                        <img src="/Public/index/teacher-5.png" class="teachimg img-responsive" alt="" title="">

                        <div class="teacherinfo"
                             style="background-color: #f0f0ef;">

                            <p class="teacheng">
                                <span>杜俊腾</span>中国科技大学  化学与材料科学
                            </p>

                            <h2><span>初中 /高中</span>数学 /物理 /化学</h2>

                            <p>化学竞赛省一  保送科大   仍参加了高考 632分</p>
                            <p class="show-txt">腾哥带你碾压高中化学！</p>
                        </div>
                    </a>
                </div>
                <!-- ./item-5 -->
                <div class="col-md-4 col-sm-6 portrait-item">
                    <a href="/Home/Index/teacherDetail/id/12">
                        <img src="/Public/index/teacher-6.png" class="teachimg img-responsive" alt="" title="">

                        <div class="teacherinfo"
                             style="background-color: #f0f0ef;">

                            <p class="teacheng">
                                <span>许若阳</span>中国科技大学  数学科学学院
                            </p>

                            <h2><span>小学 /初中 /高中</span>数学 /数学竞赛</h2>

                            <p>数学竞赛全省第八    保送科大   有一定辅导经验</p>
                            <p class="show-txt">兴趣+方法，没有什么不可能！</p>
                        </div>
                    </a>
                </div>
                <!-- ./item-6 -->
            </div>
            <div class="row last-row" style="margin-top: 80px;">
                <div class="col-md-12 text-center">
                    <a href="/Home/Index/teacherList" class="btn btn-lg btn-primary">查看更多老师</a>
                </div>
            </div>
        </div>
    </div>
    <!-- ./portrait -->

    <div class="feature">
        <div class="container text-center">
            <div class="row text-center heading-wrapper">
                <div class="col-md-12">
                    <h4 class="heading">我们的平台</h4>
                </div>
            </div>
            <div class="row">
                <div class="col-md-4 item text-center">
                    <i class="iconfont  .icon-yangefengkong ">&#xe60a</i>
                    <h4 class="item-heading">严审核 保真实</h4>

                    <p>对所有教员信息真实性严格审核，审核通过者获加入平台资格。</p>
                </div>
                <div class="col-md-4 item text-center">
                    <i class="iconfont  .icon-iconfontpeixun ">&#xe611</i>
                    <h4 class="item-heading">严格培训老师</h4>

                    <p>对所有通过审核的教员进行严格的教学培训，其中优秀者给予培训认证标识。</p>
                </div>
                <div class="col-md-4 item text-center">
                    <i class="iconfont  .icon-qunzuduoren ">&#xe60e</i>
                    <h4 class="item-heading">全程参与教学</h4>

                    <p>我们的教学专家们协助家教老师备好每一堂课，设计好每一次作业和单元测试。</p>
                </div>
                <div class="col-md-4 item text-center">
                    <i class="iconfont .icon-tui ">&#xe60f</i>
                    <h4 class="item-heading">随时退款/换老师</h4>

                    <p>家长如不满意，随时可退款，全额退还剩余课时费，如要求更换老师，随时可以更换。</p>
                </div>
                <div class="col-md-4 item text-center">
                    <i class="iconfont-2"></i>
                    <h4 class="item-heading">安全支付</h4>

                    <p>家长可以使用支付宝安全支付，也可到我们的营业网点现金支付并开具正规票据。</p>
                </div>
                <div class="col-md-4 item text-center">
                    <i class="iconfont">&#xe612</i>
                    <h4 class="item-heading">免费试讲</h4>

                    <p>所有新报课程首次第一小时为免费试讲，满意后续约。</p>
                </div>
            </div>
        </div>
    </div>

    <div class="process" id="process">
        <div class="container">
            <div class="row text-center heading-wrapper">
                <h4 class="heading">如何使用平台</h4>
            </div>



        </div>
        <div class="process-content">
            <if condition="$isMobile eq 1 ">
                <img src="/Public/index/resource/liucheng.png" alt="">
                <else />
                <h3>寻找家教的第一种流程</h3>
                <div class="process-content-main">
                    <p class="process-content-first">注册/登录</p>
                    <p class="process-content-second">浏览教员</p>
                    <p class="process-content-third">预约教员</p>
                    <p class="process-content-forth">上门试讲</p>
                </div>
                <h3 class="process-content2">寻找家教的第二种流程</h3>
                <div class="process-content-main">
                    <p class="process-content-first2">家长发布<br />需求</p>
                    <p class="process-content-second2">人工匹配<br />教师</p>
                    <p class="process-content-third2">登录/注册</p>
                    <p class="process-content-forth">上门试讲</p>
                </div>
            </if>

        </div>
        <div class="row">
            <div class="col-md-12 text-center">
                <a href="/Home/Index/teacherList" class="btn btn-lg btn-info">去寻找老师</a>
            </div>
        </div>
    </div>

    <if condition="$isMobile eq 1 ">
        <img src="/Public/index/resource/m-index-footer_bg.jpg" alt="" style="width: 100%;">
        <else />
        <div class="thehero">
            <div class="container">
                <div class="row">
                    <div class="col-sm-12 text-center content">
                        <div class="text-branding">
                            希望之路
                        </div>
                        <div class="text-content">
                            有一条路,超老师的科大学子们走过。我们除了丰富的知识,或许,还有很多东西值得与你分享。
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </if>


    <include file="./Application/Home/View/default/public/footer.html"/>
    <script src="/Public/index/base.js"></script>
    <script src="/Public/index/jquery.min.js"></script>
    <script src="/Public/index/bootstrap.min.js"></script>
    <!-- Plugin JavaScript For Index Page-->
    <script src="/Public/index/classie.js"></script>
    <script src="/Public/index/global.js"></script>
    <script src="/Public/index/index.js"></script>

    <script>

        //
        $('.long_click').on('click', function(){
            var id = '<?php echo session('id');?>';
            dataid = $(this).data('id');
            $('#FastFindModal').show().addClass('in');
        });

        // 提交预约
        $('.kkk_click').click(function(){

            var name =  $('.long_name').val();
            var cellphone =  $('.long_cellphone').val();
            var grade =  $('[name=grade]').val();
            var lesson = $('[name=lesson]').val();
            var time =  $('.long_time').val();
            var address =  $('.long_address').val();
            var remarks =  $('.long_remarks').val();
            var coursenum = $('[name=coursenum]').val();
            if (!/^[\u4e00-\u9fa5]{2,4}$/.test(name)){
                alert('请填写学生姓名');
                return false;
            }
            if (!/^1\d{10}$/.test(cellphone)){
                alert('手机号码格式不正确');
                return false;
            }
            if (grade==""){
                alert('请填写年级和科目');
                return false;
            }
            if (lesson== '') {
                alert('请填写科目');
                return false;
            }
            if( time==""){
                alert('请填写期望时间');
                return false;
            }
            if (coursenum === '') {
                alert('请填写课程时间');
                return false;
            }
            if(!/^[\u4e00-\u9fa5]+$/.test(address)){
                alert('请填写地址');
                return false;
            }
            if( remarks==""){
                alert('请填写备注');
                return false;
            }
            $.ajax({
                type:"post",
                url:"/Home/Index/fastparentOrder",
                dataType:"json",
                data:{
                    teacher_id: dataid,
                    cellphone:cellphone,
                    grade:grade,
                    name:name,
                    time:time,
                    address:address,
                    remarks:remarks,
                    lesson: lesson
                },
                success: function(result) {
                    if ( result.flag == 1) {
                        alert(result.content);
                        location.reload();
                        //$('#FastFindModal').hide().removeClass('in');
                    } else{
                        alert(result.content);
                        location.reload();
                        //$('#FastFindModal').hide().removeClass('in');
                    }
                }
            });
        })
        // 关闭语言浮层
        $('.close').click(function(){
            $('#FastFindModal').hide().removeClass('in');
        })
    </script>
    </body>
    </html>

